//
//  NetworkManager.h
//  SLDemo
//
//  Created by bocai on 2016/12/2.
//  Copyright © 2016年 Heracles. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AFNetworking/AFNetworkReachabilityManager.h>

@interface NetworkManager : NSObject

//  baseUrl
@property (nonatomic, copy) NSString *baseURLString;
//  请求最长时长
@property (nonatomic, assign) NSTimeInterval timeoutInterval;

//  是否使用缓存
@property (nonatomic, assign) BOOL cacheDisabled;
//  缓存方式
@property (nonatomic, assign) NSURLRequestCachePolicy cachePolicy;
//  缓存内存容量
@property (nonatomic, assign) NSUInteger cacheMemoryCapacity;
//  缓存磁盘容量
@property (nonatomic, assign) NSUInteger cacheDiskCapacity;

//  是否显示请求标识
@property (nonatomic, assign) BOOL activityIndicatorDisabled;
//  标识延迟显示时间
@property (nonatomic, assign) NSTimeInterval activationDelay;
//  标识完成显示时间
@property (nonatomic, assign) NSTimeInterval completionDelay;

//  网络状态
@property (nonatomic, readonly) AFNetworkReachabilityStatus reachabilityStatus;

/**
 *  单例，网络环境配置者
 *
 *  @return manager
 */
+ (instancetype)sharedManager;

/**
 *  开始配置各种网络相关环境
 */
- (void)configureNetworkContext;

@end
